<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>浮动讲解</title>
    <link rel="stylesheet" href="css/common.css" />
    <style>
      img {
        float: right;
      }

      .container {
        background-color: aqua;
        height: 400px;
        width: 400px;
      }

      .header {
        background-color: lightpink;
      }

      .footer {
        background-color: gray;
        text-align: center;
        padding: 2px;

        /* 需要清除浮动 */
        clear: both;
      }

      .eql .box1 {
        width: 150px;
        height: 100px;
        float: left;
        background-color: lightcoral;
        /* float: left; */
      }

      .eql .box2 {
        width: 150px;
        height: 100px;
        float: left;
        background-color: greenyellow;
        /* float: left; */
      }
      .eql .box3 {
        width: 150px;
        height: 100px;
        float: left;
        background-color: khaki;
        /* float: left; */
      }

      .gt .box1 {
        width: 150px;
        height: 150px;
        float: left;
        background-color: lightcoral;
        /* float: left; */
      }

      .gt .box2 {
        width: 150px;
        height: 100px;
        float: left;
        background-color: greenyellow;
        /* float: left; */
      }
      .gt .box3 {
        width: 150px;
        height: 100px;
        float: left;
        background-color: khaki;
        /* float: left; */
      }
    </style>
  </head>
  <body>
    <div class="container">
      <!-- 长宽一样的呃-->
      <!-- <div class="eql">
        <div class="box1">box1</div>
        <div class="box2">box2</div>
        <div class="box3">box3</div>
      </div> -->

      <!-- 第一个浮动元素卡住了其他-->
      <div class="gt">
        <!-- normal flow-->
        <div class="eql">
          <div class="box1">box1</div>
          <div class="box2">box2</div>
          <div class="box3">box3</div>
        </div>
      </div>
    </div>
  </body>
</html>
